Skip to content

Sync switch execution mode display#17

Merged
Pigbibi merged 1 commit into
mainfrom
codex/sync-switch-execution-mode
Jun 9, 2026
Merged

Sync switch execution mode display#17
Pigbibi merged 1 commit into
mainfrom
codex/sync-switch-execution-mode

Conversation

@Pigbibi

@Pigbibi Pigbibi commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Summary

  • read current execution mode and dry_run_only from runtime targets
  • show paper mode as Dry run in the switch UI
  • default explicit paper accounts to Dry run while live accounts reset to live on account change

Tests

  • sed -n '/<script>/,/</script>/p' web/strategy-switch-console/index.html | sed '1d;' | node --check --input-type=commonjs
  • node --check --input-type=module < web/strategy-switch-console/page_asset.js
  • node --check --input-type=module < web/strategy-switch-console/strategy_profiles_asset.js
  • node --check --input-type=module < web/strategy-switch-console/worker.js
  • python3 scripts/runtime_settings.py validate
  • python3 -m unittest discover -s tests -v
  • git diff --check

@Pigbibi Pigbibi merged commit 015cfec into main Jun 9, 2026
2 checks passed
@Pigbibi Pigbibi deleted the codex/sync-switch-execution-mode branch June 9, 2026 05:05

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6915fb7a7a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

normalized[platform][String(key)] = {
strategy_profile: profile,
execution_mode: normalizeExecutionMode(entry?.execution_mode, entry?.dry_run_only),
dry_run_only: entry?.dry_run_only === true || entry?.dry_run_only === "true" || entry?.dry_run_only === "1",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Don't coerce missing dry_run_only to live

When /api/config returns a current strategy entry that has no execution_mode and no dry_run_only (for example a legacy STRATEGY_PROFILE fallback for an explicitly paper account), this normalization stores dry_run_only: false. defaultExecutionModeForAccount() then treats that synthetic false as an explicit live mode and returns before checking the account's paper hint, so those paper accounts render and dispatch as Live instead of Dry run. Preserve the unknown state here instead of converting every missing value to false.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant